using System;
using System.Text;

namespace iBeauty.BusinessObjects
{
	[Serializable()]
	public class Staff
	{
		private string _ID;

		public string ID
		{
			get { return _ID; }
			set { _ID = value; }
		}

		private DateTime? _CreateDate;

		public DateTime? CreateDate
		{
			get { return _CreateDate; }
			set { _CreateDate = value; }
		}

		private DateTime? _ModifiedDate;

		public DateTime? ModifiedDate
		{
			get { return _ModifiedDate; }
			set { _ModifiedDate = value; }
		}

		private DateTime? _TimeStamp;

		public DateTime? TimeStamp
		{
			get { return _TimeStamp; }
			set { _TimeStamp = value; }
		}

		private string _StaffCode;

		public string StaffCode
		{
			get { return _StaffCode; }
			set { _StaffCode = value; }
		}

		private string _StaffName;

		public string StaffName
		{
			get { return _StaffName; }
			set { _StaffName = value; }
		}

		private int? _ShopId;

		public int? ShopId
		{
			get { return _ShopId; }
			set { _ShopId = value; }
		}

		private string _Address;

		public string Address
		{
			get { return _Address; }
			set { _Address = value; }
		}

		private string _Email;

		public string Email
		{
			get { return _Email; }
			set { _Email = value; }
		}

		private string _Phone;

		public string Phone
		{
			get { return _Phone; }
			set { _Phone = value; }
		}

		private int? _CommissionType;

		public int? CommissionType
		{
			get { return _CommissionType; }
			set { _CommissionType = value; }
		}

		private Single? _CommissionByPercent;

		public Single? CommissionByPercent
		{
			get { return _CommissionByPercent; }
			set { _CommissionByPercent = value; }
		}

		private Single? _CommissionByMoney;

		public Single? CommissionByMoney
		{
			get { return _CommissionByMoney; }
			set { _CommissionByMoney = value; }
		}

		private int? _SalaryType;

		public int? SalaryType
		{
			get { return _SalaryType; }
			set { _SalaryType = value; }
		}

		private Single? _BaseSalary;

		public Single? BaseSalary
		{
			get { return _BaseSalary; }
			set { _BaseSalary = value; }
		}

		private Single? _Allowance1;

		public Single? Allowance1
		{
			get { return _Allowance1; }
			set { _Allowance1 = value; }
		}

		private Single? _Allowance2;

		public Single? Allowance2
		{
			get { return _Allowance2; }
			set { _Allowance2 = value; }
		}

		private Single? _Allowance3;

		public Single? Allowance3
		{
			get { return _Allowance3; }
			set { _Allowance3 = value; }
		}

		private string _AllowanceName1;

		public string AllowanceName1
		{
			get { return _AllowanceName1; }
			set { _AllowanceName1 = value; }
		}

		private string _AllowanceName2;

		public string AllowanceName2
		{
			get { return _AllowanceName2; }
			set { _AllowanceName2 = value; }
		}

		private string _AllowanceName3;

		public string AllowanceName3
		{
			get { return _AllowanceName3; }
			set { _AllowanceName3 = value; }
		}

		private int? _NumOfDependents;

		public int? NumOfDependents
		{
			get { return _NumOfDependents; }
			set { _NumOfDependents = value; }
		}

		private Single? _PersonalDeduction;

		public Single? PersonalDeduction
		{
			get { return _PersonalDeduction; }
			set { _PersonalDeduction = value; }
		}

		private string _IsRetired;

		public string IsRetired
		{
			get { return _IsRetired; }
			set { _IsRetired = value; }
		}

		private DateTime? _StartTime;

		public DateTime? StartTime
		{
			get { return _StartTime; }
			set { _StartTime = value; }
		}

		private string _Barcode;

		public string Barcode
		{
			get { return _Barcode; }
			set { _Barcode = value; }
		}

		private DateTime? _EndTime;

		public DateTime? EndTime
		{
			get { return _EndTime; }
			set { _EndTime = value; }
		}

		private DateTime? _BreakTime;

		public DateTime? BreakTime
		{
			get { return _BreakTime; }
			set { _BreakTime = value; }
		}

		private string _WorkList;

		public string WorkList
		{
			get { return _WorkList; }
			set { _WorkList = value; }
		}

		private string _IsScheduleWorkTime;

		public string IsScheduleWorkTime
		{
			get { return _IsScheduleWorkTime; }
			set { _IsScheduleWorkTime = value; }
		}

		private string _IsCommissionService;

		public string IsCommissionService
		{
			get { return _IsCommissionService; }
			set { _IsCommissionService = value; }
		}

		private string _IsServiceCard;

		public string IsServiceCard
		{
			get { return _IsServiceCard; }
			set { _IsServiceCard = value; }
		}

		private int? _AccountId;

		public int? AccountId
		{
			get { return _AccountId; }
			set { _AccountId = value; }
		}

		private string _Note;

		public string Note
		{
			get { return _Note; }
			set { _Note = value; }
		}

		public Staff()
		{ }

		public Staff(string ID,DateTime? CreateDate,DateTime? ModifiedDate,DateTime? TimeStamp,string StaffCode,string StaffName,int? ShopId,string Address,string Email,string Phone,int? CommissionType,Single? CommissionByPercent,Single? CommissionByMoney,int? SalaryType,Single? BaseSalary,Single? Allowance1,Single? Allowance2,Single? Allowance3,string AllowanceName1,string AllowanceName2,string AllowanceName3,int? NumOfDependents,Single? PersonalDeduction,string IsRetired,DateTime? StartTime,string Barcode,DateTime? EndTime,DateTime? BreakTime,string WorkList,string IsScheduleWorkTime,string IsCommissionService,string IsServiceCard,int? AccountId,string Note)
		{
			this.ID = ID;
			this.CreateDate = CreateDate;
			this.ModifiedDate = ModifiedDate;
			this.TimeStamp = TimeStamp;
			this.StaffCode = StaffCode;
			this.StaffName = StaffName;
			this.ShopId = ShopId;
			this.Address = Address;
			this.Email = Email;
			this.Phone = Phone;
			this.CommissionType = CommissionType;
			this.CommissionByPercent = CommissionByPercent;
			this.CommissionByMoney = CommissionByMoney;
			this.SalaryType = SalaryType;
			this.BaseSalary = BaseSalary;
			this.Allowance1 = Allowance1;
			this.Allowance2 = Allowance2;
			this.Allowance3 = Allowance3;
			this.AllowanceName1 = AllowanceName1;
			this.AllowanceName2 = AllowanceName2;
			this.AllowanceName3 = AllowanceName3;
			this.NumOfDependents = NumOfDependents;
			this.PersonalDeduction = PersonalDeduction;
			this.IsRetired = IsRetired;
			this.StartTime = StartTime;
			this.Barcode = Barcode;
			this.EndTime = EndTime;
			this.BreakTime = BreakTime;
			this.WorkList = WorkList;
			this.IsScheduleWorkTime = IsScheduleWorkTime;
			this.IsCommissionService = IsCommissionService;
			this.IsServiceCard = IsServiceCard;
			this.AccountId = AccountId;
			this.Note = Note;
		}

		public override string ToString()
		{
			return "ID = " + ID + ",CreateDate = " + CreateDate.ToString() + ",ModifiedDate = " + ModifiedDate.ToString() + ",TimeStamp = " + TimeStamp.ToString() + ",StaffCode = " + StaffCode + ",StaffName = " + StaffName + ",ShopId = " + ShopId.ToString() + ",Address = " + Address + ",Email = " + Email + ",Phone = " + Phone + ",CommissionType = " + CommissionType.ToString() + ",CommissionByPercent = " + CommissionByPercent.ToString() + ",CommissionByMoney = " + CommissionByMoney.ToString() + ",SalaryType = " + SalaryType.ToString() + ",BaseSalary = " + BaseSalary.ToString() + ",Allowance1 = " + Allowance1.ToString() + ",Allowance2 = " + Allowance2.ToString() + ",Allowance3 = " + Allowance3.ToString() + ",AllowanceName1 = " + AllowanceName1 + ",AllowanceName2 = " + AllowanceName2 + ",AllowanceName3 = " + AllowanceName3 + ",NumOfDependents = " + NumOfDependents.ToString() + ",PersonalDeduction = " + PersonalDeduction.ToString() + ",IsRetired = " + IsRetired + ",StartTime = " + StartTime.ToString() + ",Barcode = " + Barcode + ",EndTime = " + EndTime.ToString() + ",BreakTime = " + BreakTime.ToString() + ",WorkList = " + WorkList + ",IsScheduleWorkTime = " + IsScheduleWorkTime + ",IsCommissionService = " + IsCommissionService + ",IsServiceCard = " + IsServiceCard + ",AccountId = " + AccountId.ToString() + ",Note = " + Note;
		}

		public class IDComparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public IDComparer()
			{ }
			public IDComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ID.CompareTo(x.ID);
				}
				else
				{
					return x.ID.CompareTo(y.ID);
				}
			}
			#endregion
		}
		public class StaffCodeComparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public StaffCodeComparer()
			{ }
			public StaffCodeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.StaffCode.CompareTo(x.StaffCode);
				}
				else
				{
					return x.StaffCode.CompareTo(y.StaffCode);
				}
			}
			#endregion
		}
		public class StaffNameComparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public StaffNameComparer()
			{ }
			public StaffNameComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.StaffName.CompareTo(x.StaffName);
				}
				else
				{
					return x.StaffName.CompareTo(y.StaffName);
				}
			}
			#endregion
		}
		public class AddressComparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public AddressComparer()
			{ }
			public AddressComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Address.CompareTo(x.Address);
				}
				else
				{
					return x.Address.CompareTo(y.Address);
				}
			}
			#endregion
		}
		public class EmailComparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public EmailComparer()
			{ }
			public EmailComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Email.CompareTo(x.Email);
				}
				else
				{
					return x.Email.CompareTo(y.Email);
				}
			}
			#endregion
		}
		public class PhoneComparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public PhoneComparer()
			{ }
			public PhoneComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Phone.CompareTo(x.Phone);
				}
				else
				{
					return x.Phone.CompareTo(y.Phone);
				}
			}
			#endregion
		}
		public class AllowanceName1Comparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public AllowanceName1Comparer()
			{ }
			public AllowanceName1Comparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.AllowanceName1.CompareTo(x.AllowanceName1);
				}
				else
				{
					return x.AllowanceName1.CompareTo(y.AllowanceName1);
				}
			}
			#endregion
		}
		public class AllowanceName2Comparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public AllowanceName2Comparer()
			{ }
			public AllowanceName2Comparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.AllowanceName2.CompareTo(x.AllowanceName2);
				}
				else
				{
					return x.AllowanceName2.CompareTo(y.AllowanceName2);
				}
			}
			#endregion
		}
		public class AllowanceName3Comparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public AllowanceName3Comparer()
			{ }
			public AllowanceName3Comparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.AllowanceName3.CompareTo(x.AllowanceName3);
				}
				else
				{
					return x.AllowanceName3.CompareTo(y.AllowanceName3);
				}
			}
			#endregion
		}
		public class IsRetiredComparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public IsRetiredComparer()
			{ }
			public IsRetiredComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.IsRetired.CompareTo(x.IsRetired);
				}
				else
				{
					return x.IsRetired.CompareTo(y.IsRetired);
				}
			}
			#endregion
		}
		public class BarcodeComparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public BarcodeComparer()
			{ }
			public BarcodeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Barcode.CompareTo(x.Barcode);
				}
				else
				{
					return x.Barcode.CompareTo(y.Barcode);
				}
			}
			#endregion
		}
		public class WorkListComparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public WorkListComparer()
			{ }
			public WorkListComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.WorkList.CompareTo(x.WorkList);
				}
				else
				{
					return x.WorkList.CompareTo(y.WorkList);
				}
			}
			#endregion
		}
		public class IsScheduleWorkTimeComparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public IsScheduleWorkTimeComparer()
			{ }
			public IsScheduleWorkTimeComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.IsScheduleWorkTime.CompareTo(x.IsScheduleWorkTime);
				}
				else
				{
					return x.IsScheduleWorkTime.CompareTo(y.IsScheduleWorkTime);
				}
			}
			#endregion
		}
		public class IsCommissionServiceComparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public IsCommissionServiceComparer()
			{ }
			public IsCommissionServiceComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.IsCommissionService.CompareTo(x.IsCommissionService);
				}
				else
				{
					return x.IsCommissionService.CompareTo(y.IsCommissionService);
				}
			}
			#endregion
		}
		public class IsServiceCardComparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public IsServiceCardComparer()
			{ }
			public IsServiceCardComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.IsServiceCard.CompareTo(x.IsServiceCard);
				}
				else
				{
					return x.IsServiceCard.CompareTo(y.IsServiceCard);
				}
			}
			#endregion
		}
		public class NoteComparer : System.Collections.Generic.IComparer<Staff>
		{
			public SorterMode SorterMode;
			public NoteComparer()
			{ }
			public NoteComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<Staff> Membres
			int System.Collections.Generic.IComparer<Staff>.Compare(Staff x, Staff y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Note.CompareTo(x.Note);
				}
				else
				{
					return x.Note.CompareTo(y.Note);
				}
			}
			#endregion
		}
	}
}
